# Simple C++ Makefile
CXX = g++
CXXFLAGS = -Wall -Wextra -std=c++17
TARGET = program
SOURCES = $(wildcard *.cpp)
OBJECTS = $(SOURCES:.cpp=.o)

# Configurable include paths (can be overridden from command line)
INCLUDE_DIRS ?= ./crow/include ./asio-asio-1-28-0/asio/include
INCLUDE_PATHS = $(addprefix -I,$(INCLUDE_DIRS))

$(TARGET): $(OBJECTS)
	$(CXX) $(OBJECTS) -o $(TARGET)

%.o: %.cpp
	$(CXX) $(CXXFLAGS) $(INCLUDE_PATHS) -c $< -o $@

clean:
	rm -f $(OBJECTS) $(TARGET)

.PHONY: clean
